<include file="__THEME__/user_header" />
<script>
	var _options = {};
	$('.feedBox').contentLoader(_options);
</script>
	<article class="app_widgets dailys"> 
		<ul class="parents">
			<?php foreach ($roles as $role):?>
			<li><a href="<?php echo append_query(array('role' => $role['role']));?>" class="<?php if($_REQUEST['role'] == $role['role']):?>on<?php endif;?>"><?php echo getUserRole($role['role']);?></a><em class="number">(<?php echo $role['count'];?>篇)</em><cite><?php echo friendlyDate($role['ctime']);?></cite></li>
			<?php endforeach;?>
		</ul>
		<dl class="dates">
			<?php for ($i=0; $i<=$age[0]; $i++) :
				if (!isset($_REQUEST['age'])) {
					$_age = $age[0];
				} else {
					$_age = $_REQUEST['age'];
				}
				if (!isset($_REQUEST['month'])) {
					if ($age[1]) {
						$_month = $age[1];
					} else {
						$_month = 1;
					}
				} else {
					$_month = $_REQUEST['month'];
				}
				
				if ($_age == $age[0]) {
					if ($age[1]) {
						$months = $age[1];
					} else {
						$months = 1;
					}
					
				} else {
					$months = 12;
				}
			?>
			<?php if ($i == $_age):?>
			<dt><a href="<?php echo append_query(array('age' => $i));?>" class="on"><?php echo $i;?>岁</a></dt>
				<?php for ($j=1; $j<=$months; $j++) :?>
					<dd><a href="<?php echo append_query(array('age' => $i, 'month' => $j));?>" class="<?php if ($j == $_month):?>on<?php endif;?>"><?php echo $j;?></a></dd>
				<?php endfor; ?>
			<?php else:?>
			<dt><a href="<?php echo append_query(array('age' => $i));?>" class=""><?php echo $i;?>岁</a></dt>
				<?php for ($j=1; $j<=$months; $j++) :?>
					<dd class="hidden"><a href="<?php echo append_query(array('age' => $i, 'month' => $j));?>"><?php echo $j;?></a></dd>
				<?php endfor; ?>			
			<?php endif;?>
			<?php endfor; ?>
		</dl>
		
		<!-- daily start -->
		<div class="daily">
			<h3><span>(<?php echo todayWeather('city');?><em class=""><img src="<?php echo weatherIcon(todayWeather('weather1'));?>" width="48" /></em>)</span> &nbsp;<span class="time"><?php echo friendlyDate(time(), 'cn');?></span> </h3>
			<form class="creator" action="<?php echo U('weibo/operate/publish');?>" method="POST">
				<textarea name="content" id="content_publish" rows="8"></textarea>
				<div class="comments">
					<ul class="buttons help_editor_icons"> 
						<li><a href="" class="button"><em class="icon icon_small_emotion">&nbsp;</em>表情</a></li>
						<li><a href="" class="button"><em class="icon icon_small_topic">&nbsp;</em>话题</a></li>
						<!--<li><a href="" class="button"><em class="icon icon_small_pic">&nbsp;</em>图片</a></li>
						<li><a href="" class="button"><em class="icon icon_small_video">&nbsp;</em>视频</a></li>
						<li><a href="" class="button"><em class="icon icon_small_music">&nbsp;</em>音乐</a></li>-->
					</ul>
					<input type="hidden" name="publish_type" value="2">
					<input type="submit" name="submit" value="保存日记" class="submit" />
				</div>
			</form>
		</div>
		<!-- daily end -->
		
        <div class="feedBox">
          <div id="countNew"> </div>
        <php>if($gid){</php>
		{:W('WeiboList', array('mid'=>$mid, 'list'=>$list['data'], 'insert'=>1,'simple'=>2))}
		<php>}else{</php>
		{:W('WeiboList', array('mid'=>$mid, 'list'=>$list['data'], 'insert'=>1))}
		<php>}</php>

        </div>		
		
	
		
	</article>
	
<include file="__THEME__/user_footer" />